/**
 * Copyright (C) 2010 Cloudfarming <info@cloudfarming.nl>
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package nl.cloudfarming.client.geoviewer;

import com.vividsolutions.jts.geom.Geometry;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.UnsupportedFlavorException;
import java.io.IOException;
import nl.cloudfarming.client.model.DataProvider;
import nl.cloudfarming.client.model.Shape;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;

/**
 * Layer for editing polygons
 * There should be only one instance of this layer registered with the mapcontroller
 * MapController implementation might check for this and throw an exception
 * when an attempt is made to add a second EditLayer.
 *
 *
 * @author Timon Veenstra
 */
public class EditLayer extends ObjectLayer<LayerObject<Geometry,Shape>>{


    public EditLayer(DataProvider dataProvider) {
        super(new EditLayerPalette(), Category.AREA, NbBundle.getMessage(EditLayer.class, "layer.edit.name"),dataProvider,true);
    }


    /**
     * retrieves all globally registered edit layer actions
     *
     * @return
     */
    @Override
    public EditLayerAction[] getActions() {
        return Lookup.getDefault().lookupAll(EditLayerAction.class).toArray(new EditLayerAction[]{});
    }

    @Override
    public DataFlavor[] getTransferDataFlavors() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean isDataFlavorSupported(DataFlavor flavor) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    


}
